<template>
  <div class="box">
    <div @click="alert">点击{{ yin ? "隐藏" : "显示" }}弹框</div>
    <div class="alert" v-show="yin">
      <p @click="alert">X</p>
    </div>
  </div>
</template>

<script>
import { ref } from "vue";
import Alert from "./Alert.css";
export default {
  setup() {
    let yin = ref(true);
    function alert() {
      yin.value = !yin.value;
    }
    return {
      alert,
      yin,
    };
  },
};
</script>

<style></style>
